package com.ruoyi.sea.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.sea.domain.SeaValue;
import com.ruoyi.sea.mapper.SeaValueMapper;
import com.ruoyi.sea.service.ISeaValueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 海洋实时统计Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-07
 */
@Service
public class SeaValueServiceImpl implements ISeaValueService 
{
    @Autowired
    private SeaValueMapper seaValueMapper;

    /**
     * 查询海洋实时统计
     * 
     * @param id 海洋实时统计主键
     * @return 海洋实时统计
     */
    @Override
    public SeaValue selectSeaValueById(Long id)
    {
        return seaValueMapper.selectSeaValueById(id);
    }

    /**
     * 查询海洋实时统计列表
     * 
     * @param seaValue 海洋实时统计
     * @return 海洋实时统计
     */
    @Override
    public List<SeaValue> selectSeaValueList(SeaValue seaValue)
    {
        return seaValueMapper.selectSeaValueList(seaValue);
    }

    /**
     * 新增海洋实时统计
     * 
     * @param seaValue 海洋实时统计
     * @return 结果
     */
    @Override
    public int insertSeaValue(SeaValue seaValue)
    {
        seaValue.setCreateTime(DateUtils.getNowDate());
        return seaValueMapper.insertSeaValue(seaValue);
    }

    /**
     * 修改海洋实时统计
     * 
     * @param seaValue 海洋实时统计
     * @return 结果
     */
    @Override
    public int updateSeaValue(SeaValue seaValue)
    {
        seaValue.setUpdateTime(DateUtils.getNowDate());
        return seaValueMapper.updateSeaValue(seaValue);
    }

    /**
     * 批量删除海洋实时统计
     * 
     * @param ids 需要删除的海洋实时统计主键
     * @return 结果
     */
    @Override
    public int deleteSeaValueByIds(Long[] ids)
    {
        return seaValueMapper.deleteSeaValueByIds(ids);
    }

    /**
     * 删除海洋实时统计信息
     * 
     * @param id 海洋实时统计主键
     * @return 结果
     */
    @Override
    public int deleteSeaValueById(Long id)
    {
        return seaValueMapper.deleteSeaValueById(id);
    }
}
